package cn.zhaoyuening.zamh.queue;

import cn.zhaoyuening.zamh.msg.Msg;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by 赵岳宁 on 2017/6/3.
 */
public class LinkedMsgQueue implements MsgQueue {
    private List<Msg> msgList = new LinkedList<Msg>();

    public LinkedMsgQueue() {

    }

    public void pushMsg(Msg msg) {
        msgList.add(msg);
    }

    public Msg pop() {
        return msgList.remove(0);
    }

    public int size() {
        return msgList.size();
    }
}
